//
//  CCStringTests.swift
//  SwiftUtilsTests
//
//  Created by wangyu on 10/28/21.
//

import XCTest
@testable import SwiftUtils

class CCStringTests: XCTestCase {
    func testExample() throws {
        let s = "abcdef"
        
        XCTAssert(s.substring(start: 0, length: 2) == "ab")
        XCTAssert(s.substring(start: 0, length: 10) == "abcdef")
        XCTAssert(s.substring(start: 2, length: 2) == "cd")
        XCTAssert(s.substring(start: 2, length: 10) == "cdef")
        XCTAssert(s.substring(start: 10, length: 10) == "")
    }
}
